// This is a part of the WceUi library.
// Copyright (C) WceUi Team
// All rights reserved.
//
// Coded by Hui Xu
//
#pragma once
#include "WceUiCommon.h"
#include "WceUiLayer.h"
#include "WceUiXml.h"
#include "WceUiDbClick.h"

class CWceUiStatic : public CWceUiLayer
{
	WCEUI_DYNCREATE_BEGIN(CWceUiStatic, CWceUiLayer);
public:
	CWceUiStatic();
	virtual ~CWceUiStatic();

	virtual void OnLButtonDown(UINT nFlags,  POINT point);
	virtual void OnLButtonUp(UINT nFlags,	 POINT point);
	virtual void OnMouseMove(UINT nFlags, POINT point);
	virtual void OnLButtonDblClk(UINT nFlags,POINT point);

public:
	void SetDbClick(DWORD dwDelay = DBCLICK_DEFALUT_DELAY, 
		int xDist = DBCLICK_DEFALUT_X_DIST, int yDist = DBCLICK_DEFALUT_Y_DIST);

private:
	BOOL m_bLMouseDown;

	//handle double-click message
	CWceUiDbClick m_HandleDbClick;

private:
	CWceUiStatic (const CWceUiStatic &);
	CWceUiStatic & operator=(const CWceUiStatic &);
};

WCEUI_DYNCREATE_END(CWceUiStatic, CWceUiLayer);

